<?php

namespace App\Http\Controllers\live;

use App\Http\Controllers\Controller;
use App\Models\GrLive;
use App\Models\GrUser;
use Illuminate\Http\Request;

class LiveController extends Controller
{
    public function index(Request $request){
        $userId=1;
        $live_id = $request->get('live_id');
        $live = GrLive::where('live_id',$live_id)->select('play_url','live_id')->get()->toArray()[0];
        $user = GrUser::where('id',$userId)->select('real_name')->get()->toArray()[0];
        return view('live',compact('user','live'));
    }

}
